﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dispatcher.Interfaces
{
    public interface ITask
    {
        /// <summary>
        /// Executes the current task.
        /// 
        /// This method shall be implemented so that the job specified for the
        /// task gets executed.
        /// </summary>
        /// <returns>True if successful, otherwise false</returns>
        bool Execute();

        /// <summary>
        /// Returns the name of the task.
        /// </summary>
        /// <returns>The Task name</returns>
        string Name
        {
            get;
        }

        /// <summary>
        /// Returns the dispatch interval in minutes.
        /// </summary>
        DispatchInterval Interval
        {
            get;
        }
    }
}
